#!/usr/bin/env bash

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@

HALVM_LIBDIR=${libdir}/HaLVM/@PACKAGE_VERSION@

usage()
{
  echo "Usage: halvm-config [option]"
  echo "Options:"
  echo "  --libdir"
  echo "  --ivclib"
  echo "  --cflags"
  echo "  --ghcflags"
  exit 0
}

if test $# -ne 1; then
  usage
fi

case $1 in
  --libdir) echo ${HALVM_LIBDIR} ;;
  --ivclib) echo ${libdir}/libIVC.a ;;
  --cflags) echo -I${HALVM_LIBDIR}/include ;;
  --ghcflags) echo -I${HALVM_LIBDIR} -optP-I${HALVM_LIBDIR};;
  *) usage
esac

